#include <stdio.h>

// int fscanf(FILE *restrict stream,  const char *restrict format, ...);
// int fprintf(FILE *restrict stream, const char *restrict format, ...);
// int sprintf(char *restrict str, const char *restrict format, ...);
/* int main()
{
    int a, b;

    // scanf("%d %d", &a, &b);
    // printf("a=%d b=%d\n", a, b);

    fscanf(stdin, "%d %d", &a, &b);
    fprintf(stdout, "a=%d b=%d\n", a, b);

    return 0;
}
 */

int main()
{
    int a, b;

    FILE *fp = fopen("scanf-input.txt", "r");
    fscanf(fp, "%d %d", &a, &b);
    // 从文件输入

    FILE *fp1 = fopen("print-output.txt", "w");
    fprintf(fp1, "a=%d b=%d\n", a, b);
    // 输出到文件

    char str[100] = {0};
    sprintf(str, "a=%d b=%d\n", a, b);
    // 输出到字符串
    printf("str  %s", str);

    return 0;
}
